package cn.com.dhcc.ddi.datamapping.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.dhcc.app.core.exception.DaoException;
import cn.com.dhcc.app.core.exception.ServiceException;
import cn.com.dhcc.app.core.handler.modulehandler.WhereCondition;
import cn.com.dhcc.app.core.handler.pagerhandler.Pager;
import cn.com.dhcc.app.core.handler.pagerhandler.PagerData;
import cn.com.dhcc.app.core.service.BaseService;
import cn.com.dhcc.ddi.datamapping.dao.FuncIdentifyDao;
import cn.com.dhcc.ddi.datamapping.vo.FuncIdentify;

/**
 * 
 * @ClassName: DataIdentityService
 * @Description: 函数管理
 * @author fxx
 * @date 2016-12-14
 * 
 */
@Service
public class FuncIdentityService extends BaseService{
	@Autowired
	FuncIdentifyDao funcIdentifyDao;

	/**
	 * @throws ServiceException 
	 * 
	 * @Title: getPagerList
	 * @Description: 获取函数列表信息
	 * @param @param pager
	 * @param @param searchParameter
	 * @param @return 参数
	 * @return PagerData<FuncIdentify> 返回类型
	 * @throws
	 */
	public PagerData<FuncIdentify> getPagerList(Pager pager, WhereCondition searchParameter) throws ServiceException{
		try {
			return funcIdentifyDao.getPagerList(pager, searchParameter);
		} catch (DaoException e) {
			throw new ServiceException("获取函数列表信息失败", e);
		}
	}
	
	/**
	 * 
	 * @Title: getById
	 * @Description: 获取函数对象
	 * @param @param id
	 * @param @return
	 * @param @throws ServiceException 参数
	 * @return FuncIdentify 返回类型
	 * @throws
	 */
	public FuncIdentify getById(String id) throws ServiceException{
		try {
			return funcIdentifyDao.getById(id);
		} catch (DaoException e) {
			throw new ServiceException("获取函数对象失败", e);
		}
	}
	
	/**
	 * 
	 * @Title: list
	 * @Description: 获取函数列表
	 * @param @return
	 * @param @throws ServiceException 参数
	 * @return List<FuncIdentify> 返回类型
	 * @throws
	 */
	public List<FuncIdentify> list() throws ServiceException{
		try {
			return funcIdentifyDao.list();
		} catch (DaoException e) {
			throw new ServiceException("获取函数列表失败", e);
		}
	}
	
	/**
	 * 
	 * @Title: list
	 * @Description: 获取函数列表
	 * @param @return
	 * @param @throws ServiceException 参数
	 * @return List<FuncIdentify> 返回类型
	 * @throws
	 */
	public List<FuncIdentify> getList(WhereCondition condition) throws ServiceException{
		try {
			return funcIdentifyDao.getList(condition);
		} catch (DaoException e) {
			throw new ServiceException("获取函数列表失败", e);
		}
	}

}
